package com.rcloud.server.sealtalk.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * 用户举报表
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "user_report")
public class UserReport {
    /**
     * 主键ID
     */
    @Id
    @Column(name = "id")
    private Integer id;

    /**
     * 被举报用户的id
     */
    @Column(name = "report_user_id")
    private Integer reportUserId;

    /**
     * 举报内容
     */
    @Column(name = "content")
    private String content;

    /**
     * 举报图片
     */
    @Column(name = "image_url")
    private String imageUrl;

    /**
     * 用户id
     */
    @Column(name = "user_id")
    private Integer userId;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 后台审核是否成立 0、否，1、是
     */
    @Column(name = "is_deal")
    private Integer isDeal;

    /**
     * 审核时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @Column(name = "auth_time")
    private Date authTime;
    /**
     * 被举报人昵称
     */
    @Transient
    private String reportNickname;
    /**
     * 被举报人头像
     */
    @Transient
    private String reportAvatar;
    /**
     * 举报人用户头像
     */
    @Transient
    private String userNickname;
    /**
     * 举报人用户头像
     */
    @Transient
    private String userAvatar;
}